<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title> member_edit </title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
    <?php htmlhead(); ?>
  </head>
  
  <body>

    <form method="post" action="?act=member_edit" name="myform" id="myform" class="myform">
      <input type="hidden" name="id" value="<?php echo $data['member_id'];?>" />
      <div class="panel">      
        <div class="t">修改角色</div>
        <dl>
          <dt>父角色:</dt>
          <dd>
            <select name="parent_id">
              <option value="0">　</option>
              <?php
              foreach($members as $_=>$v) {
                if($v['member_id']==$data['parent_id']) {
                  echo('<option selected="true" value="'.$v['member_id'].'">'.$v['member_name'].'</option>');
                }
                else {
                  echo('<option value="'.$v['member_id'].'">'.$v['member_name'].'</option>');
                }
              }
              ?>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>角色:</dt>
          <dd><input type="text" name="member_name" value="<?php echo $data['member_name'];?>" /></dd>
        </dl>
        <dl>
          <dt>阶级:</dt>
          <dd>
            <select name="member_rank">
            <?php
            foreach($ranks as $_=>$v) {
              if($v['rank_id']==$data['member_rank']) {
               echo('<option selected="true" value="'.$v['rank_id'].'">'.$v['rank_name'].'</option>');
              }
              else {
                echo('<option value="'.$v['rank_id'].'">'.$v['rank_name'].'</option>');
              }
            }
            ?>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>种族:</dt>
          <dd>
            <select name="member_race">
            <?php
            foreach($races as $_=>$v) {
              if($v['race_id']==$data['member_race']) {
               echo('<option selected="true" value="'.$v['race_id'].'">'.$v['race_name'].'</option>');
              }
              else {
                echo('<option value="'.$v['race_id'].'">'.$v['race_name'].'</option>');
              }
            }
            ?>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>职业:</dt>
          <dd>
            <select name="member_class">
            <?php
            foreach($classes as $_=>$v) {
              if($v['class_id']==$data['member_class']) {
               echo('<option selected="true" value="'.$v['class_id'].'">'.$v['class_name'].'</option>');
              }
              else {
                echo('<option value="'.$v['class_id'].'">'.$v['class_name'].'</option>');
              }
            }
            ?>
            </select>
          </dd>
        </dl>
        <dl>
          <dt>等级:</dt>
          <dd><input type="text" name="member_level" value="<?php echo $data['member_level'];?>" /></dd>
        </dl>
        <dl><dt></dt>
          <dd><input type="submit" value="修改" class="btn" /></dd>
        </dl>
      </div>
    </form>

    <script>
    <?php echo getTips(); ?>
    </script>
    
</body>
</html>